<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Flow-IPC: ipc::shm::stl::Arena_activator&lt; Arena &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Flow-IPC<span id="projectnumber">&#160;1.0.2</span>
   </div>
   <div id="projectbrief">Flow-IPC project: Full implementation reference.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceipc.html">ipc</a></li><li class="navelem"><a class="el" href="namespaceipc_1_1shm.html">shm</a></li><li class="navelem"><a class="el" href="namespaceipc_1_1shm_1_1stl.html">stl</a></li><li class="navelem"><a class="el" href="classipc_1_1shm_1_1stl_1_1Arena__activator.html">Arena_activator</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pri-static-attribs">Static Private Attributes</a> &#124;
<a href="classipc_1_1shm_1_1stl_1_1Arena__activator-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">ipc::shm::stl::Arena_activator&lt; Arena &gt; Class Template Reference</div></div>
</div><!--header-->
<div class="contents">

<p>RAII-style class operating a stack-like notion of a the given <em>thread</em>'s currently active SHM-aware <code>Arena</code>, so that <a class="el" href="classipc_1_1shm_1_1stl_1_1Stateless__allocator.html" title="Stateless allocator usable with STL-compliant containers to store (or merely read) them directly in S...">Stateless_allocator</a> knows which <code>Arena</code> is currently active w/r/t a given code context operating on a SHM-stored container instance.  
 <a href="classipc_1_1shm_1_1stl_1_1Arena__activator.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="arena__activator_8hpp_source.html">arena_activator.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for ipc::shm::stl::Arena_activator&lt; Arena &gt;:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classipc_1_1shm_1_1stl_1_1Arena__activator__inherit__graph.svg" width="142" height="131"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for ipc::shm::stl::Arena_activator&lt; Arena &gt;:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classipc_1_1shm_1_1stl_1_1Arena__activator__coll__graph.svg" width="275" height="155"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a7b67cc75923884afa231be9b649ddd5d"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipc_1_1shm_1_1stl_1_1Arena__activator.html#a7b67cc75923884afa231be9b649ddd5d">Arena_obj</a> = Arena</td></tr>
<tr class="memdesc:a7b67cc75923884afa231be9b649ddd5d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Short-hand for the <code>Arena</code> type this activates/deactivates in the current thread of ctor/dtor.  <a href="classipc_1_1shm_1_1stl_1_1Arena__activator.html#a7b67cc75923884afa231be9b649ddd5d">More...</a><br /></td></tr>
<tr class="separator:a7b67cc75923884afa231be9b649ddd5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a2ed251f580639100783a63e1d8a0689d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipc_1_1shm_1_1stl_1_1Arena__activator.html#a2ed251f580639100783a63e1d8a0689d">Arena_activator</a> (<a class="el" href="classipc_1_1shm_1_1stl_1_1Arena__activator.html#a7b67cc75923884afa231be9b649ddd5d">Arena_obj</a> *new_arena_not_null)</td></tr>
<tr class="memdesc:a2ed251f580639100783a63e1d8a0689d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Activates the given <a class="el" href="classipc_1_1shm_1_1stl_1_1Arena__activator.html#a7b67cc75923884afa231be9b649ddd5d" title="Short-hand for the Arena type this activates/deactivates in the current thread of ctor/dtor.">Arena_obj</a>.  <a href="classipc_1_1shm_1_1stl_1_1Arena__activator.html#a2ed251f580639100783a63e1d8a0689d">More...</a><br /></td></tr>
<tr class="separator:a2ed251f580639100783a63e1d8a0689d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4d206ca25145e551b5cf8a01816335a7"><td class="memItemLeft" align="right" valign="top"><a id="a4d206ca25145e551b5cf8a01816335a7" name="a4d206ca25145e551b5cf8a01816335a7"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>~Arena_activator</b> ()</td></tr>
<tr class="memdesc:a4d206ca25145e551b5cf8a01816335a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">See ctor. This undoes what that did. <br /></td></tr>
<tr class="separator:a4d206ca25145e551b5cf8a01816335a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-methods" name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:afdce25994086de598aa4c880a6040763"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classipc_1_1shm_1_1stl_1_1Arena__activator.html#a7b67cc75923884afa231be9b649ddd5d">Arena_obj</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipc_1_1shm_1_1stl_1_1Arena__activator.html#afdce25994086de598aa4c880a6040763">this_thread_active_arena</a> ()</td></tr>
<tr class="memdesc:afdce25994086de598aa4c880a6040763"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the active arena, as understood by <code><a class="el" href="classipc_1_1shm_1_1stl_1_1Stateless__allocator.html" title="Stateless allocator usable with STL-compliant containers to store (or merely read) them directly in S...">Stateless_allocator</a>&lt;Arena_obj&gt;</code> at this point in the calling thread.  <a href="classipc_1_1shm_1_1stl_1_1Arena__activator.html#afdce25994086de598aa4c880a6040763">More...</a><br /></td></tr>
<tr class="separator:afdce25994086de598aa4c880a6040763"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-static-attribs" name="pri-static-attribs"></a>
Static Private Attributes</h2></td></tr>
<tr class="memitem:a69544c72e7ca9b79e71e2d4a6c8f79e4"><td class="memItemLeft" align="right" valign="top">static thread_local <a class="el" href="classipc_1_1shm_1_1stl_1_1Arena__activator.html#a7b67cc75923884afa231be9b649ddd5d">Arena_obj</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipc_1_1shm_1_1stl_1_1Arena__activator.html#a69544c72e7ca9b79e71e2d4a6c8f79e4">s_this_thread_active_arena</a></td></tr>
<tr class="memdesc:a69544c72e7ca9b79e71e2d4a6c8f79e4"><td class="mdescLeft">&#160;</td><td class="mdescRight">See this_thread_active_arena.  <a href="classipc_1_1shm_1_1stl_1_1Arena__activator.html#a69544c72e7ca9b79e71e2d4a6c8f79e4">More...</a><br /></td></tr>
<tr class="separator:a69544c72e7ca9b79e71e2d4a6c8f79e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><div class="compoundTemplParams">template&lt;typename Arena&gt;<br />
class ipc::shm::stl::Arena_activator&lt; Arena &gt;</div><p >RAII-style class operating a stack-like notion of a the given <em>thread</em>'s currently active SHM-aware <code>Arena</code>, so that <a class="el" href="classipc_1_1shm_1_1stl_1_1Stateless__allocator.html" title="Stateless allocator usable with STL-compliant containers to store (or merely read) them directly in S...">Stateless_allocator</a> knows which <code>Arena</code> is currently active w/r/t a given code context operating on a SHM-stored container instance. </p>
<p >In its ctor, it activates the given <code>Arena*</code>. In it dtor it re-activates the <code>Arena*</code> active at ctor time (or null if none was active). Behavior is undefined if ctor and dtor are called from different threads.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="namespaceipc_1_1shm_1_1stl.html" title="ipc::shm sub-module providing integration between STL-compliant components (including containers) and...">shm::stl</a> namespace doc header for background. </dd>
<dd>
<a class="el" href="classipc_1_1shm_1_1stl_1_1Stateless__allocator.html" title="Stateless allocator usable with STL-compliant containers to store (or merely read) them directly in S...">Stateless_allocator</a>, the main class template that <a class="el" href="classipc_1_1shm_1_1stl_1_1Arena__activator.html" title="RAII-style class operating a stack-like notion of a the given thread&#39;s currently active SHM-aware Are...">Arena_activator</a> helps one use. </dd></dl>

<p class="definition">Definition at line <a class="el" href="arena__activator_8hpp_source.html#l00040">40</a> of file <a class="el" href="arena__activator_8hpp_source.html">arena_activator.hpp</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="a7b67cc75923884afa231be9b649ddd5d" name="a7b67cc75923884afa231be9b649ddd5d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7b67cc75923884afa231be9b649ddd5d">&#9670;&nbsp;</a></span>Arena_obj</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Arena &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="classipc_1_1shm_1_1stl_1_1Arena__activator.html">ipc::shm::stl::Arena_activator</a>&lt; Arena &gt;::Arena_obj =  Arena</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Short-hand for the <code>Arena</code> type this activates/deactivates in the current thread of ctor/dtor. </p>

<p class="definition">Definition at line <a class="el" href="arena__activator_8hpp_source.html#l00046">46</a> of file <a class="el" href="arena__activator_8hpp_source.html">arena_activator.hpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a2ed251f580639100783a63e1d8a0689d" name="a2ed251f580639100783a63e1d8a0689d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2ed251f580639100783a63e1d8a0689d">&#9670;&nbsp;</a></span>Arena_activator()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Arena &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classipc_1_1shm_1_1stl_1_1Arena__activator.html">ipc::shm::stl::Arena_activator</a>&lt; Arena &gt;::Arena_activator </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classipc_1_1shm_1_1stl_1_1Arena__activator.html#a7b67cc75923884afa231be9b649ddd5d">Arena_obj</a> *&#160;</td>
          <td class="paramname"><em>new_arena_not_null</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Activates the given <a class="el" href="classipc_1_1shm_1_1stl_1_1Arena__activator.html#a7b67cc75923884afa231be9b649ddd5d" title="Short-hand for the Arena type this activates/deactivates in the current thread of ctor/dtor.">Arena_obj</a>. </p>
<p ><code><a class="el" href="classipc_1_1shm_1_1stl_1_1Stateless__allocator.html" title="Stateless allocator usable with STL-compliant containers to store (or merely read) them directly in S...">Stateless_allocator</a>&lt;T, Arena&gt;</code> ops, as invoked by STL-compliant container types parameterized on <code><a class="el" href="classipc_1_1shm_1_1stl_1_1Stateless__allocator.html" title="Stateless allocator usable with STL-compliant containers to store (or merely read) them directly in S...">Stateless_allocator</a>&lt;T, Arena&gt;</code>, shall use that given arena for alloc/dealloc in the calling thread until <code>*this</code> dtor is invoked. The dtor shall restore the current <code>Arena*</code> (possibly null) at time of entry to this ctor.</p>
<p >Another <code><a class="el" href="classipc_1_1shm_1_1stl_1_1Arena__activator.html" title="RAII-style class operating a stack-like notion of a the given thread&#39;s currently active SHM-aware Are...">Arena_activator</a>&lt;Arena_obj&gt;</code> can be used to activate/deactivate another <a class="el" href="classipc_1_1shm_1_1stl_1_1Arena__activator.html#a7b67cc75923884afa231be9b649ddd5d" title="Short-hand for the Arena type this activates/deactivates in the current thread of ctor/dtor.">Arena_obj</a> in stack-like fashion.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">new_arena_not_null</td><td>The <a class="el" href="classipc_1_1shm_1_1stl_1_1Arena__activator.html#a7b67cc75923884afa231be9b649ddd5d" title="Short-hand for the Arena type this activates/deactivates in the current thread of ctor/dtor.">Arena_obj</a> to activate. Must not be null (else behavior undefined/assertion may trip). </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="arena__activator_8hpp_source.html#l00096">96</a> of file <a class="el" href="arena__activator_8hpp_source.html">arena_activator.hpp</a>.</p>

<p class="reference">References <a class="el" href="arena__activator_8hpp_source.html#l00107">ipc::shm::stl::Arena_activator&lt; Arena &gt;::this_thread_active_arena()</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classipc_1_1shm_1_1stl_1_1Arena__activator_a2ed251f580639100783a63e1d8a0689d_cgraph.svg" width="371" height="59"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="afdce25994086de598aa4c880a6040763" name="afdce25994086de598aa4c880a6040763"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afdce25994086de598aa4c880a6040763">&#9670;&nbsp;</a></span>this_thread_active_arena()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Arena &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classipc_1_1shm_1_1stl_1_1Arena__activator.html">Arena_activator</a>&lt; Arena &gt;<a class="el" href="classipc_1_1shm_1_1stl_1_1Arena__activator.html#a7b67cc75923884afa231be9b649ddd5d">::Arena_obj</a> * <a class="el" href="classipc_1_1shm_1_1stl_1_1Arena__activator.html">ipc::shm::stl::Arena_activator</a>&lt; Arena &gt;::this_thread_active_arena</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the active arena, as understood by <code><a class="el" href="classipc_1_1shm_1_1stl_1_1Stateless__allocator.html" title="Stateless allocator usable with STL-compliant containers to store (or merely read) them directly in S...">Stateless_allocator</a>&lt;Arena_obj&gt;</code> at this point in the calling thread. </p>
<p >This is generally used by <a class="el" href="classipc_1_1shm_1_1stl_1_1Stateless__allocator.html" title="Stateless allocator usable with STL-compliant containers to store (or merely read) them directly in S...">Stateless_allocator</a> itself; but it is publicly exposed also, as it may be of interest.</p>
<dl class="section return"><dt>Returns</dt><dd>See above. Note this may be null. </dd></dl>

<p class="definition">Definition at line <a class="el" href="arena__activator_8hpp_source.html#l00107">107</a> of file <a class="el" href="arena__activator_8hpp_source.html">arena_activator.hpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="stateless__allocator_8hpp_source.html#l00201">ipc::shm::stl::Stateless_allocator&lt; T, Arena &gt;::allocate()</a>, <a class="el" href="arena__activator_8hpp_source.html#l00096">ipc::shm::stl::Arena_activator&lt; Arena &gt;::Arena_activator()</a>, and <a class="el" href="stateless__allocator_8hpp_source.html#l00218">ipc::shm::stl::Stateless_allocator&lt; T, Arena &gt;::deallocate()</a>.</p>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classipc_1_1shm_1_1stl_1_1Arena__activator_afdce25994086de598aa4c880a6040763_icgraph.svg" width="371" height="167"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a69544c72e7ca9b79e71e2d4a6c8f79e4" name="a69544c72e7ca9b79e71e2d4a6c8f79e4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a69544c72e7ca9b79e71e2d4a6c8f79e4">&#9670;&nbsp;</a></span>s_this_thread_active_arena</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Arena &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">thread_local <a class="el" href="classipc_1_1shm_1_1stl_1_1Arena__activator.html">Arena_activator</a>&lt; Arena &gt;<a class="el" href="classipc_1_1shm_1_1stl_1_1Arena__activator.html#a7b67cc75923884afa231be9b649ddd5d">::Arena_obj</a> * <a class="el" href="classipc_1_1shm_1_1stl_1_1Arena__activator.html">ipc::shm::stl::Arena_activator</a>&lt; Arena &gt;::s_this_thread_active_arena</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>See this_thread_active_arena. </p>
<p >The key point is it is thread-local and a separate object per distinct <code>Arena</code> type. </p>

<p class="definition">Definition at line <a class="el" href="arena__activator_8hpp_source.html#l00085">85</a> of file <a class="el" href="arena__activator_8hpp_source.html">arena_activator.hpp</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>shm/stl/<a class="el" href="arena__activator_8hpp_source.html">arena_activator.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu May 2 2024 23:56:39 for Flow-IPC by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>
